<template>
  <div>
    find
    <mMap ref='ch'/>
    <van-button @click="getPosition">getPosition</van-button>
    <br>
    {{ this.longitude }}=={{ this.latitude }}
  </div>
</template>

<script>
import mMap from "@/components/Mmap";

export default {
  name: "Find",
  data() {
    return {
      longitude: null,
      latitude: null,
    }
  },
  methods: {
    getPosition() {
      this.longitude = this.$refs.ch.lng;
      this.latitude = this.$refs.ch.lat;
      console.log(this.longitude + "==" + this.latitude)
    }
  },
  components: {mMap}
}
</script>

<style scoped>

</style>